<template>
  <!-- <KeepAlive>
    <router-link to="/student">基本信息</router-link>
  </KeepAlive>
  <KeepAlive>
    <router-link to="/education">教育信息</router-link>
  </KeepAlive>
  <KeepAlive>
    <router-link to="/work">工作信息</router-link>
  </KeepAlive>
  <KeepAlive>
    <router-link to="/health">健康信息</router-link>
  </KeepAlive> -->
  <div>
    <el-radio-group v-model="radioKey" size="large">
      <el-radio-button label="Student">基本信息</el-radio-button>
      <el-radio-button label="Education">教育信息</el-radio-button>
      <el-radio-button label="Work">工作信息</el-radio-button>
      <el-radio-button label="Health">健康信息</el-radio-button>
      <el-radio-button label="Others">附加信息</el-radio-button>
    </el-radio-group>
  </div>
  <div>
    <KeepAlive>
      <component :is="componentMap[radioKey]"></component>
    </KeepAlive>
  </div>
</template>

<script setup>
import { ref } from 'vue'
import Student from './Student.vue'
import Education from './Education.vue'
import Work from './Work.vue'
import Health from './Health.vue'
import Others from './Others.vue'
import Language from './Language.vue'

const radioKey = ref('Student')
const componentMap = {
  Student,
  Education,
  Work,
  Health,
  Others
}
</script>
<script>
export default {
  name: 'NewForm'
}
</script>

